<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>

    </title>
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
        content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=0,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <link href="css/common.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link rel="stylesheet" href="css/swiper.min.css">
    <link rel="stylesheet" href="css/jquery.mCustomScrollbar.css">
</head>

<body class="insideBody">
    <div class="containerBox">
        <div class="slideLeft">
            <div class="header">
                <div class="nav-box">
                    <h1 class="logo " title="">
                        <a href="/">
                            <img src="./images/logo.png" alt="">
                        </a>
                    </h1>
                    <div class="nav">
                        <ul class="clearfix">
                            <li><a href="">品牌简介</a></li>
                            <li><a href="">品牌商标</a></li>
                            <li><a href="">品牌里程碑</a></li>
                            <li><a href="">最新资讯</a></li>
                            <li>
                                <a href="">产品介绍</a>
                                <dl>
                                    <dd>
                                        <a href="">最新新品</a>
                                    </dd>
                                    <dd>
                                        <a href="">明星产品</a>
                                    </dd>
                                    <dd>
                                        <a href="">历年产品</a>
                                    </dd>
                                </dl>
                            </li>
                            <li><a href="">门店导航</a></li>
                            <li ><a href="http://mukchaikee.com" target="_blank">木仔记</a></li>
                        </ul>
                    </div>
                </div>
                <div class="bot">
                    <div class="tel">
                        <img src="./images/tel.png" alt="">
                        <div class="t">咨询热线</div>
                        <div class="num">
                            400-688-8888</div>
                    </div>
                    <div class="support">
                        <p>All rights reserved 2018 © 桂源铺</p>
                        <p>技术支持：柏优传媒</p>
                        <p><a href="">沪ICP备19017269号-1</a></p>
                    </div>
                </div>

            </div>
            <div class="container" id="container">
                <div class="crumbs clearfix">
                    <div class="left">
                        <span class="title">
                            门店导航
                         </span>
                        <span class="en">
                            Stores navigation
                        </span>
                    </div>
                </div>
               <div class="storeCont">
                   <div class="map-search clearfix">
                       <div class="input-group single-select-group" name="single-select1">
                           <input type="text" id="province" value="省" data-id="" autocomplete="off" readonly="">
                           <ul id="provincelist" >

                               <li data-value="110000">北京市</li>

                               <li data-value="120000">天津市</li>

                               <li data-value="130000">河北省</li>

                               <li data-value="140000">山西省</li>

                               <li data-value="150000">内蒙古自治区</li>

                               <li data-value="210000">辽宁省</li>

                               <li data-value="220000">吉林省</li>

                               <li data-value="230000">黑龙江省</li>

                               <li data-value="310000">上海市</li>

                               <li data-value="320000">江苏省</li>

                               <li data-value="330000">浙江省</li>

                               <li data-value="340000">安徽省</li>

                               <li data-value="350000">福建省</li>

                               <li data-value="360000">江西省</li>

                               <li data-value="370000">山东省</li>

                               <li data-value="410000">河南省</li>

                               <li data-value="420000">湖北省</li>

                               <li data-value="430000">湖南省</li>

                               <li data-value="440000">广东省</li>

                               <li data-value="450000">广西壮族自治区</li>

                               <li data-value="460000">海南省</li>

                               <li data-value="500000">重庆市</li>

                               <li data-value="510000">四川省</li>

                               <li data-value="520000">贵州省</li>

                               <li data-value="530000">云南省</li>

                               <li data-value="540000">西藏自治区</li>

                               <li data-value="610000">陕西省</li>

                               <li data-value="620000">甘肃省</li>
                               <li data-value="630000">青海省</li>
                               <li data-value="640000" class="on">宁夏回族自治区</li>
                               <li data-value="650000">新疆维吾尔自治区</li>
                               <li data-value="710000">台湾省</li>
                               <li data-value="810000">香港特别行政区</li>
                               <li data-value="820000">澳门特别行政区</li>
                           </ul>
                       </div>
                       <div class="input-group single-select-group" name="single-select2">
                           <input type="text" id="city" value="市" data-id="" autocomplete="off" readonly="">
                           <ul id="citylist" style="display: none;">
                               <li data-value="0" class="on">市</li>
                           </ul>
                       </div>
                       <div class="input-group single-select-group" name="single-select3">
                           <input type="text" id="area" value="区" data-id="" autocomplete="off" readonly="">
                           <ul id="arealist" style="display: none;">
                               <li data-value="0">区</li>
                           </ul>
                       </div>
                   </div>
                   <div class="ser-input-group" style="margin-right: 4px">
                       <input type="text" class="storeName" each-input="" id="storeName" name="storeName" placeholder="按店铺名搜索" autocomplete="off">
                       <div class="btn" title="搜索"></div>
                   </div>
                   <div class="navigation ">
                       <div class="store">
                           <i class="ico"></i>
                           店铺地址
                       </div>
                       <div class="list clearfix">
                           <div class="item">
                               <div class="ti">
                                   上海长风大悦城店
                               </div>
                               <div class="desc">
                                   <div class="p">
                                       ADD：大渡河178号长风大悦城购物中心地下一层01-57号
                                   </div>
                                   <div class="p">
                                       TEL：17602136143
                                   </div>
                               </div>
                           </div>

                       </div>

                   </div>
               </div>
            </div>
        </div>
        <div class="slideRight">
            <div class="slideRightBg" style="background-image: url('./images/bg1.jpg')"></div>
        </div>
    </div>
    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script src="js/swiper.min.js"></script>
    <script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="js/common.js"></script>
    <script src="js/chinaMapConfig.js"></script>

    <script type="text/javascript">
        (function($){
            $(window).load(function(){
                $("#container").mCustomScrollbar({
                    theme:"minimal"
                });

                //省市区筛选
                $('[name="single-select1"]').click(function (e) {
                    var _this = $(this);
                    e.stopPropagation();
                    $('[name="single-select1"]').find('ul').hide();
                    _this.find('ul').show();
                    _this.find('li').each(function (index, el) {
                        if ($(this).text() == _this.find('input').val()) {
                            $(this).addClass('on').siblings().removeClass('on')
                        }
                    });
                });
                $('[name="single-select1"] li').click(function (e) {
                    e.stopPropagation();
                    var val = $(this).text();
                    var vid = $(this).attr("data-value");
                    $(this).parents('[name="single-select1"]').find('input').val(val);
                    $(this).parents('[name="single-select1"]').find('input').attr("data-id", vid);
                    $('[name="single-select1"] ul').hide();
                    $('[name="single-select2"] ul').hide();
                    $('[name="single-select3"] ul').hide();
                    //获取市、区
                    GetShiQu(vid);
                    //当点击省，市、区恢复默认
                    $("#city").val("市").attr("data-id", "");
                    $("#area").val("区").attr("data-id", "");
                });
                $(document).click(function () { $('[name="single-select1"] ul').hide() });
                //2-------------------------------------------------
                $('[name="single-select2"]').click(function (e) {
                    var _this = $(this);
                    e.stopPropagation();
                    $('[name="single-select2"]').find('ul').hide();
                    _this.find('ul').show();
                    _this.find('li').each(function (index, el) {
                        if ($(this).text() == _this.find('input').val()) {
                            $(this).addClass('on').siblings().removeClass('on')
                        }
                    });
                });
                $('[name="single-select2"]').on('click', 'ul>li', function (e) {
                    e.stopPropagation();
                    var val = $(this).text();
                    var vid = $(this).attr("data-value");
                    $(this).parents('[name="single-select2"]').find('input').val(val);
                    $(this).parents('[name="single-select2"]').find('input').attr("data-id", vid);
                    $('[name="single-select1"] ul').hide();
                    $('[name="single-select2"] ul').hide();
                    $('[name="single-select3"] ul').hide();
                    //获取区
                    GetQu(vid);
                    //当点击市，区恢复默认
                    $("#area").val("区").attr("data-id", "");
                });
                $(document).click(function () { $('[name="single-select2"] ul').hide() });
                //3-------------------------------------------------
                $('[name="single-select3"]').click(function (e) {
                    var _this = $(this);
                    e.stopPropagation();
                    $('[name="single-select3"]').find('ul').hide();
                    _this.find('ul').show();
                    _this.find('li').each(function (index, el) {
                        if ($(this).text() == _this.find('input').val()) {
                            $(this).addClass('on').siblings().removeClass('on')
                        }
                    });
                });
                $('[name="single-select3"]').on('click', 'ul>li', function (e) {
                    e.stopPropagation();
                    var val = $(this).text();
                    var vid = $(this).attr("data-value");
                    $(this).parents('[name="single-select3"]').find('input').val(val);
                    $(this).parents('[name="single-select3"]').find('input').attr("data-id", vid);
                    $('[name="single-select1"] ul').hide();
                    $('[name="single-select2"] ul').hide();
                    $('[name="single-select3"] ul').hide();
                });
                $(document).click(function () { $('[name="single-select3"] ul').hide() });

                //市、区
                function GetShiQu(oneid) {
                    $("#citylist").html("");
                    $("#arealist").html("");
                    $.ajax({
                        type: "POST",
                        url: "/Ajax/GetSsq.aspx",
                        cache: false,
                        data: "typeid=1&classid=" + oneid + "&classids=0",
                        dataType: "json",
                        success: function (result) {
                            $("#citylist").html(result.sbOutPutString1);
                            $("#arealist").html(result.sbOutPutString2);
                        }
                    });
                }
                //区
                function GetQu(towid) {
                    $("#arealist").html("");
                    $.ajax({
                        type: "POST",
                        url: "/Ajax/GetSsq.aspx",
                        cache: false,
                        data: "typeid=1&classid=" + $("#province").attr("data-id") + "&classids=" + towid,
                        dataType: "json",
                        success: function (result) {
                            $("#arealist").html(result.sbOutPutString2);
                        }
                    });
                }

                //搜索
                $('#ss-btn').click(function () {
                    var strone = $("#province").val() != "省" ? $("#province").val() : "";
                    var strtwo = $("#city").val() != "市" ? $("#city").val() : "";
                    var strthree = $("#area").val() != "区" ? $("#area").val() : "";
                    var storeName = $("#storeName").val();
                    var res = 0;

                    if (isNull(strone) && isNull(strtwo) && isNull(strthree) && isNull(storeName)) {
                        alert("请选择省市区或直接输入店名！");
                        $("#province").focus();
                        res += 1;
                        return false;
                    }
                    if (res == 0) {
                        $(".map-panel").html("");
                        $.ajax({
                            type: "POST",
                            url: "/Ajax/GetAddress.aspx",
                            cache: false,
                            data: "one=" + $("#province").attr("data-id") + "&two=" + $("#city").attr("data-id") + "&three=" + $("#area").attr("data-id") + "&storeName=" + storeName,
                            dataType: "json",
                            success: function (result) {
                                $(".map-panel").html(result.sb);
                            }
                        });
                    }
                });


            });

        })(jQuery);


    </script>

</body>

</html>
